﻿using LianXi1013.Entity.Menu;
using LianXi1013.Service.Menu;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace LianXi1013.WebAPI.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class MenuController : ControllerBase
    {
        private readonly IMenuInforService menuInforService;

        public MenuController(IMenuInforService menuInforService)
        {
            this.menuInforService = menuInforService;
        }

        /// <summary>
        /// 菜单显示
        /// </summary>
        /// <returns></returns>
        [HttpGet("GetMenu")]
        public List<MenuInfor> GetMenu(int id)
        {
            return menuInforService.GetMenu(id);
        }
    }
}
